package routers

import (
	"github.com/gin-gonic/gin"
	"im_project/internal/controll"
)

func InitRouters(r *gin.Engine) {

	login := r.Group("/acc")
	{
		login.GET("/login", controll.Login)
	}
	r.LoadHTMLGlob("views/*")
	r.Static("/static", "./static")

	r.GET("/", func(c *gin.Context) {
		c.HTML(200, "index.html", nil)
	})
	r.GET("/login", controll.Chat)

	//r.LoadHTMLGlob("/views/**")
	//r.StaticFS("/views",http.Dir("C:\\Users\\zzzz\\go\\src\\im_project\\views"))
	//r.LoadHTMLFiles("/views/*")
	r.Run(":9900")
}
